package com.glsc.ngateway.common.base.domain.mysql.gateway.platform.it;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.datatype.jsr310.deser.LocalDateTimeDeserializer;
import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateTimeSerializer;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import javax.persistence.*;
import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.List;

@Data
@Entity
@Table(name = "t_it_server_device")
public class ItServerDevice implements Serializable {

    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Column(name = "dev_id")
    private Integer devId;

    @Column(name = "business_name")
    private String businessName;

    @Column(name = "application_detail")
    private String applicationDetail;

    @Column(name = "machine_room")
    private String machineRoom;

    @Column(name = "machine_cab")
    private String machineCab;

    @Column(name = "machine_unit")
    private String machineUnit;

    @Column(name = "capital_typed")
    private String capitalTyped;

    @Column(name = "capital_type")
    private String capitalType;

    @Column(name = "capital_style")
    private String capitalStyle;

    @Column(name = "brand")
    private String brand;

    @Column(name = "brand_type")
    private String brandType;

    @Column(name = "pn_pid")
    private String pnPid;

    @Column(name = "sn")
    private String sn;
    @Column(name = "operation_sys")
    private String operationSys;
    @Column(name = "disk_type")
    private String diskType;
    @Column(name = "cpu")
    private String cpu;
    @Column(name = "memory")
    private String memory;
    @Column(name = "user_id")
    private String userId;
    @Column(name = "cc_time")
    private LocalDateTime ccTime;
    @Column(name = "wb_time")
    private LocalDateTime wbTime;
    @Column(name = "sj_time")
    private LocalDateTime sjTime;
    @Column(name = "plan_on")
    private String planOn;
    @Column(name = "support_power")
    private String supportPower;

    @Column(name = "bz")
    private String bz;
    @Column(name = "machine_status")
    private String machineStatus;
    @Column(name = "mac1")
    private String mac1;
    @Column(name = "mac2")
    private String mac2;
    @Column(name = "mac3")
    private String mac3;
    @Column(name = "mac4")
    private String mac4;
    @Column(name = "mac5")
    private String mac5;
    @Column(name = "mac6")
    private String mac6;
    @Column(name = "mac7")
    private String mac7;
    @Column(name = "mac8")
    private String mac8;
    @Column(name = "mac9")
    private String mac9;
    @Column(name = "mac10")
    private String mac10;
    @Column(name = "mac11")
    private String mac11;
    @Column(name = "mac12")
    private String mac12;

    @Column(name = "ip1")
    private String ip1;
    @Column(name = "ip2")
    private String ip2;
    @Column(name = "ip3")
    private String ip3;
    @Column(name = "ip4")
    private String ip4;

    @Column(name = "qj")
    private String qj;

    @Column(name = "fix_record")
    private String fixRecord;
    @Column(name = "fix_time")
    private LocalDateTime fixTime;
    @Column(name = "bf")
    private String bf;
    @Column(name = "network_segment")
    private String networkSegment;
    @Column(name = "ilo")
    private String ilo;

    @Column(name = "insert_time", columnDefinition = "datetime comment '创建时间'")
    @org.hibernate.annotations.CreationTimestamp
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonSerialize(using = LocalDateTimeSerializer.class)
    @JsonDeserialize(using = LocalDateTimeDeserializer.class)
    protected LocalDateTime insertTime;

    @Column(name = "update_time", columnDefinition = "datetime comment '更新时间'")
    @org.hibernate.annotations.UpdateTimestamp
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonSerialize(using = LocalDateTimeSerializer.class)
    @JsonDeserialize(using = LocalDateTimeDeserializer.class)
    protected LocalDateTime updateTime;


    @Transient
    private String userAccount;

    @Transient
    private String userName;

    @Transient
    private String fixTimeStr;

    @Transient
    private String ccTimeStr;
    @Transient
    private String sjTimeStr;
    @Transient
    private String wbTimeStr;

    @Transient
    private String opName;
    @Transient
    private String mxName;

    @Transient
    private String department;

    @Transient
    private String opStyle;

    @Transient
    private String opStyleName;

    @Transient
    private List<String> ipList;
}
